﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DataDictionaryDemo.aspx.cs" Inherits="Bingosoft.WebApp.Modules.DataDictionary.DataDictionaryDemo" %>
<%@ Import Namespace="Bingosoft.Components.DataDictionary" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form runat="server">
    <web:SmartFormView ID="SmartFormView1" runat="server" DefaultMode="Insert">
    <InsertItemTemplate>
    </InsertItemTemplate>
    <EditItemTemplate></EditItemTemplate>
    <ItemTemplate>

    bb:<asp:Label runat="server"><%=DataDictionaryUtil.LookupItemText("Sex", "M")%></asp:Label>
   
    <div>
    <web:DataDictionaryDropDownList ID="MyDictionary" runat="server" DictionaryCode="Sex" SelectedValue='<%#Evl("M")%>' OnSelectedIndexChanged="IndexChanged" AutoPostBack="true">                
        <asp:ListItem Value="all">全部</asp:ListItem>
    </web:DataDictionaryDropDownList>
    <br />
    Current Selected Text:<%=MyDictionary.SelectedItem.Text%><br />
    Current Selected SelectedValue:<%=MyDictionary.SelectedValue%><br />
    Current Selected SelectedIndex:<%=MyDictionary.SelectedIndex%><br />
    </div>
    <br />
    <div>
    <web:DataDictionaryRadioButtonList ID="MyDictionary2" runat="server" DictionaryCode="Sex" OnTextChanged="IndexChanged" AutoPostBack="true">                        
    </web:DataDictionaryRadioButtonList>    
    <br />
    Current Selected Text:<%=MyDictionary2.SelectedItem.Text%><br />
    Current Selected SelectedValue:<%=MyDictionary2.SelectedValue%><br />
    Current Selected SelectedIndex:<%=MyDictionary2.SelectedIndex%><br />
    </div>
    <br />   
    </ItemTemplate>
    </web:SmartFormView>

    <asp:DropDownList ID="DataDictionaryDropDownList1" runat="server" SelectedValue='<%#Evl("w")%>' OnSelectedIndexChanged="IndexChanged" AutoPostBack="true">                
        <asp:ListItem Value="all">全部</asp:ListItem>
        <asp:ListItem Value="m">男</asp:ListItem>
        <asp:ListItem Value="w">女</asp:ListItem>
    </asp:DropDownList>

    <asp:Button ID="Button1" runat="server" Text="按键" />    

    <web:DataDictionaryDropDownList ID="MyDictionary3" runat="server" DictionaryCode="Bingosoft.Modules.DataDictionary.EnumCountry" SelectedValue='<%#Evl("M")%>' OnSelectedIndexChanged="IndexChanged" AutoPostBack="true">                
    </web:DataDictionaryDropDownList>
    <br />

    <div>
    OnSelectedIndexChanged :<br />
    Current Selected Text:<%=CurrentSelectList.SelectedItem.Text%><br />
    Current Selected SelectedValue:<%=CurrentSelectList.SelectedValue%><br />
    Current Selected SelectedIndex:<%=CurrentSelectList.SelectedIndex%><br />
    </div>
    <br />
    <web:SmartSqlDataSource ID="SmartSqlDataSource1" runat="server" SelectCommand="Components.DataDictionary.LookupDataDictionary"
     SelectCommandAutoPageWrap="false"> 
     <SelectParameters>
     <asp:Parameter Name="catalogKey" DefaultValue="aa" />
     </SelectParameters>
    </web:SmartSqlDataSource>
    </form>
</body>
</html>
